<?php

namespace Zilla\FrontBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * Zilla\FrontBundle\Entity\Region
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Zilla\FrontBundle\Entity\RegionRepository")
 */
class Region
{

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;
    
    /**
     * 
     * @var City
     * 
     * @ORM\ManyToOne(targetEntity="City", inversedBy="regions")
     * @ORM\JoinColumn(name="city_id", referencedColumnName="id")
     */
    private $city;
    
    /**
     * 
     * @var ArrayCollection $proWinker
     * 
     * @ORM\OneToMany(targetEntity="ProWinker", mappedBy="region")
     */
    private $proWinkers;
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Region
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * 
     * @return City
     */
    public function getCity()
    {
        return $this->city;
    }

    /**
     * 
     * @param City
     */
    public function setCity(City $city)
    {
        $this->city = $city;
    }
    
    /**
     * 
     * @return ArrayCollection
     */
    public function getProWinkers()
    {
        return $this->proWinkers;
    }

    /**
     *
     * @param ArrayCollection $proWinkers 
     */
    public function setProWinkers(ArrayCollection $proWinkers)
    {
        $this->proWinkers = $proWinkers;
    }
    
    /**
     * 
     * @param ProWinker $proWinker
     */
    public function addProWinker(ProWinker $proWinker)
    {
        $this->proWinkers->add($proWinker);
        
    }


}
